const app=getApp();
Component({
  data:{
    systemInfo:{},
    data:{
      types:[]
    },
    app:app,
    info:[],
  },
  props:{

  },
  didMount() {
    this._init();
    this._getSystemInfo();
    // 数据问题数据内容
    this._info();
  },
  didUpdate(){
    // this._init();
  },
  onPullDownRefresh() {
    console.log("我被下拉了")
    setTimeout(() => this.stopPullDownRefresh(), 1000);
    // 页面被下拉
  },
    stopPullDownRefresh() {
    my.stopPullDownRefresh({
      complete(res) {
        console.log("下拉完成了",res, new Date())
      }
    })
  },
  onReachBottom() {
    // 页面被拉到底部
  },
  methods:{
    _init(){
      console.log(this.props);
      this.setData(this.props);
      this.setData({
        problem:[
          {image:"/image/btn-1.png",tit:"租赁规则"}
        ]
      })
    },
    _getSystemInfo() {
      my.getSystemInfo({
        success: (res) => {
          this.setData({
            systemInfo: res
          })
        }
      })
    },
    // 常见问题列表
    _info(){
      this.setData({
        info:[
          {tit:"租赁规则","image":"/image/temp/problem.jpg","icon":'/image/problem/a.png'},
          {tit:"其他问题","image":"/image/temp/problem.jpg","icon":'/image/problem/b.png'},
          {tit:"订单问题","image":"/image/temp/problem.jpg","icon":'/image/problem/c.png'},
          {tit:"押金问题","image":"/image/temp/problem.jpg","icon":'/image/problem/d.png'},
          {tit:"物流问题","image":"/image/temp/problem.jpg","icon":'/image/problem/e.png'},
          {tit:"租赁规则","image":"/image/temp/problem.jpg","icon":'/image/problem/f.png'}
        ]
      })
    }
  }
});
